package com.yss.reportworld.mapper.kettle;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yss.reportworld.domain.kettle.EtlJob;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * ETL采集作业Mapper接口
 *
 * @author yss
 * @date 2023-07-14
 */
@Component
public interface EtlJobMapper extends BaseMapper<EtlJob> {

    /**
     * 作业列表导出EXECl
     *
     * @param wrapper
     * @return
     */
    public List<EtlJob> queryEtlJob(@Param(Constants.WRAPPER) QueryWrapper<EtlJob> wrapper);

    /**
     * 获取 作业列表
     *
     * @return
     */
    @Select("SELECT ID, JOB_NAME, TEMPLATE_ID, LEVEL_ID, REMARK, JOB_FREQUENCY, TARGET_RESOURCE_ID, STATUS, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME " +
            " FROM RW_DB_ETL_JOB ${ew.customSqlSegment}")
    public List<EtlJob> queryEtlJobAll(@Param(Constants.WRAPPER) QueryWrapper<EtlJob> wrapper);
}
